//
//  UIImage+YJC.m
//  xiangzhe
//
//  Created by lyt on 16/11/8.
//  Copyright © 2016年 com.dazhebao. All rights reserved.
//

#import "UIImage+YJC.h"

@implementation UIImage (YJC)

+ (instancetype)originImage:(UIImage *)image scaleToSize:(CGSize)size {
    
    UIGraphicsBeginImageContext(size);
    
    [image drawInRect:CGRectMake(0, 0, size.width, size.height)];
    
    UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();
    
    UIGraphicsEndImageContext();
    
    return scaledImage;
 
}
@end
